package queue;

import Array.Array;

/**
 * @Description TODO
 * @Author zrj
 * @Date 2020/8/1 14:53
 * @Version 1.0
 */
public class ArrayQueue implements Queue{

     Array array ;

     public ArrayQueue(int capacity) {
         array = new Array(capacity);
     }

    public ArrayQueue() {
        array = new Array();
    }

    public void enqueue(int e) {
        array.addLast(e);
    }

    public int dequeue() {
        return array.removeFirst();
    }

    public int getFront() {
        return array.getFirst();
    }

    public int getSize() {
        return array.getSize();
    }

    public boolean isEmpty() {
        return array.isEmpty();
    }
}
